CSharpTest.Net
DebugLocking<T> Constructor(Boolean,Int32,Int32,Boolean,Int32)
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace > DebugLocking<T> Class > DebugLocking<T> Constructor : DebugLocking<T> Constructor(Boolean,Int32,Int32,Boolean,Int32)

captureStack
limitTimeout
limitNestedReaders
concurrentReads
limitNestedWriters

Glossary Item Box

Constructs the lock tracking object

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal captureStack As Boolean, _
   ByVal limitTimeout As Integer, _
   ByVal limitNestedReaders As Integer, _
   ByVal concurrentReads As Boolean, _
   ByVal limitNestedWriters As Integer _
)
C# 
public DebugLocking<T>( 
   bool captureStack,
   int limitTimeout,
   int limitNestedReaders,
   bool concurrentReads,
   int limitNestedWriters
)

Parameters

captureStack
limitTimeout
limitNestedReaders
concurrentReads
limitNestedWriters

Example

Library/Library.Test/LockingTests/TestDebugLocking.cs

C#Copy Code
using (DebugLocking lck = new DebugLocking<IgnoreLocking>())
    Assert.IsFalse(lck.CaptureStack);
using (DebugLocking lck = new DebugLocking<IgnoreLocking>(true, 0, 0, false, 0))
    Assert.IsTrue(lck.CaptureStack);
VB.NETCopy Code
Using lck As DebugLocking = New DebugLocking(Of IgnoreLocking)()
    Assert.IsFalse(lck.CaptureStack)
End Using
Using lck As DebugLocking = New DebugLocking(Of IgnoreLocking)(True, 0, 0, False, 0)
    Assert.IsTrue(lck.CaptureStack)
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys